LIBOBJS = queue.o route.o waypt.o filter_vecs.o util.o vecs.o mkshort.o \
csv_util.o strptime.o grtcirc.o vmem.o util_crc.o xmlgeneric.o \
- uuid.o formspec.o xmltag.o cet.o cet_util.o \
+ uuid.o formspec.o xmltag.o cet.o cet_util.o fatal.o \
$(COLDSYNC) $(GARMIN) $(JEEPS) $(SHAPE) $(FMTS) $(FILTERS)
OBJS = main.o globals.o $(LIBOBJS)
--- /dev/null
+/*
+ Functions to indicate inconsistent or fatal conditions.
+
+ Copyright (C) 2002-2005 Robert Lipe, robertlipe@usa.net
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+
+#include "defs.h"
+void
+fatal(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ exit(1);
+}
+
+void
+warning(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+}
+
/*
Misc utilities.
- Copyright (C) 2002 Robert Lipe, robertlipe@usa.net
+ Copyright (C) 2002-2005 Robert Lipe, robertlipe@usa.net
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
printf("%f%c ", fabs(c), d);
}
-void
-fatal(const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
- exit(1);
-}
-
void
is_fatal(const int condition, const char *fmt, ...)
{
fatal("%s\n", buff);
}
-void
-warning(const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
-}
-
/*
* Read 4 bytes in big-endian. Return as "int" in native endianness.
*/